Release 10.1A: OpenEdge Development:
Programming Interfaces
Managing multiple environments
If you are writing an application builder, you might want to maintain separate environments for each application.
![]()
To separate application environments:
- Have the user select an existing application or create a new one.
- Load the existing application environment, or create and load a new one using the
LOADstatement.- Execute the
USEstatement to make the selected application environment current.- If the application exists, run it according to user input.
If the application is new:
- Allocate the number of available color and font table entries for the new application by setting the
NUM–ENTRIESattribute of theCOLOR–TABLEandFONT–TABLEhandles.- Set internal colors and fonts from user input using the
SYSTEM–DIALOG COLORandFONTstatements, or set internal colors using theCOLOR–TABLEhandle.- Create application widgets and code from user input using the current color and font definitions.
- Test and revise application resources and widgets according to user input.
- Repeat Steps 1 through 5 for as many applications as you need to work on simultaneously.
- When the user terminates all work on an application and wants to save it:
- Save the color and font table entries to the current environment using the
PUT–KEY–VALUEstatement with theCOLORandFONToptions.- Save the application code to procedure files.
- Delete all widgets for the application from Progress memory using the
DELETE WIDGETstatement.- Remove the current application environment from Progress memory using the
UNLOADstatement.- Execute the
USEstatement according to user input to set a new current environment, then repeat Steps 4 through 8 until all work is done.Helpful hints for environment management
Many variations in the typical scenario are possible, but this is a summary of important tasks to consider in any application that uses multiple environments:
- Before defining colors and fonts for immediate use at runtime, set or adjust the size of the current color and font tables as required using the
NUM–ENTRIESattribute of theCOLOR–TABLEandFONT–TABLEhandles.- Use the
PUT–KEY–VALUEstatement with theCOLORandFONToptions to save newly created and newly modified color and font definitions from the current color and font tables to the current environment.- Always set a current environment with the
USEstatement before or after executing theUNLOADstatement for the current environment, even if the current environment you set is the default environment. Otherwise, Progress returns an error when you attempt to display or enable a widget.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |